//
//  ChatBar.h
//  keyboard
//
//  Created by 遇水 on 16/3/12.
//  Copyright © 2016年 遇水. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <Foundation/Foundation.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <AVFoundation/AVFoundation.h>
@class ChatBar;
@protocol ChatBarDelegate <NSObject>

@optional

/**
 *  发送图片消息
 *
 *  @param chatBar <#chatBar description#>
 *  @param images  <#images description#>
 */
-(void)chatBar:(ChatBar *)chatBar sendPictures:(NSArray<UIImage *> * )images;
/**
 *  发送消息
 *
 *  @param chatBar <#chatBar description#>
 *  @param message <#message description#>
 */
-(void)chatBar:(ChatBar *)chatBar sendMessage:(NSAttributedString *)message;
/**
 *  发送地图
 *
 *  @param chatBar
 *  @param location
 */
-(void)chatBar:(ChatBar *)chatBar sendLocation:(CLLocationCoordinate2D )location;
/**
 *  发送语音
 *
 *  @param chatBar
 *  @param vocieName
 *  @param time      
 */
-(void)chatBar:(ChatBar *)chatBar sendVoice:(NSString *)vocieName time:(NSTimeInterval)time;

/**
 *  发送视频
 *
 *  @param chatBar    <#chatBar description#>
 *  @param messageURL <#messageURL description#>
 */

-(void)chatBar:(ChatBar *)chatBar sendVodieMessage:(NSURL *)messageURL time:(NSTimeInterval)time;

@end


@interface ChatBar : UIView


@property (nonatomic, assign) id<ChatBarDelegate>    delegate;

/**如果没有设置，默认为控制器*/
@property (nonatomic, strong) UIViewController    *superViewController;
//设置自己的高度。默认为45 ，默认宽度和键盘相同
@property (nonatomic, assign) CGFloat    chatBarHeight;


-(void)endEdit;

//+(instancetype)sharedChatBar;


@end
